package games.gong.durid.entity;

import jakarta.validation.constraints.Null;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserRole {
    @Null(message = "用户角色ID必须为空")
    private Long id;

    private Long userId;

    private Long roleId;

    private LocalDateTime createTime;

    // Constructors

    public UserRole(Long id, Long userId, Long roleId) {
        this.id = id;
        this.userId = userId;
        this.roleId = roleId;
    }

}